/**
 * 2009-10-28 下午01:50:45 
 * esignature
 * com.smc.dao.impl
 * AuthenticationDaoImpl
 */
package com.smc.dao.impl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.smc.dao.AuthenticationDao;
import com.smc.domain.model.Authentication;
import com.smc.domain.model.User;

/**
 * @author chenheng
 * @version 0.0.1
 * 持久层授权接口实现。
 */
public class AuthenticationDaoImpl extends HibernateDaoSupport implements AuthenticationDao {
	public void save_AD_AU_SA_authentication(Authentication authentication) {
		getHibernateTemplate().saveOrUpdate(authentication);
	}

	@SuppressWarnings("unchecked")
	public List<Authentication> fetch_IG_IG_IG_authentication(User user) {
		List<Authentication> la = null ;
		String hql = "SELECT a FROM Authentication a WHERE a.user = ?";
		la = getHibernateTemplate().find(hql, user);
		return la;
	}

}
